import http from '@/http/http'
import { BlogModel } from './BlogModel'

enum Api {
    addAndEdit = '/api/v1/blog/blog',
    upload = '/api/v1/blog/upload'
}

// 获取博客配置信息
export const getBlogApi = async () => {
    return await http.get(Api.addAndEdit)
}

// 修改博客配置
export const editBlogConfigApi = async (param: BlogModel) => {
    return await http.post(Api.addAndEdit, param)
}

// 上传图片
export const getUploadUrlApi = () => {
    return http.baseUrl + Api.upload
}
